package com.ebo.supervideoplayer;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import io.agora.openvcall.R;

public class MyTestActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


//        Intent intent = getIntent();
//        String url = intent.getStringExtra("url");
//        intent = new Intent(MyTestActivity.this,VideoViewActivity.class);
//        intent.putExtra(VideoViewActivity.VIDEO_PATH,url);
//        startActivity(intent);
//        finish();
//        if(true){return;}


        setContentView(R.layout.activity_my_test);
        initViews();
    }

    void initViews() {
        findViewById(R.id.btn_mp4).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent appIntent = new Intent(MyTestActivity.this,VideoViewActivity.class);
                appIntent.putExtra(VideoViewActivity.VIDEO_PATH,"http://47.94.18.243/upload/file/avi/20170609/1496976458.avi");
                startActivity(appIntent);
            }
        });
        findViewById(R.id.btn_flv).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent appIntent = new Intent(MyTestActivity.this,VideoViewActivity.class);
                appIntent.putExtra(VideoViewActivity.VIDEO_PATH,"http://47.94.18.243/upload/file/avi/20170609/1496976458.avi");
                startActivity(appIntent);
            }
        });
        findViewById(R.id.btn_avi).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent appIntent = new Intent(MyTestActivity.this,VideoViewActivity.class);
                appIntent.putExtra(VideoViewActivity.VIDEO_PATH,"http://47.94.18.243/upload/file/avi/20170609/1496976458.avi");
                startActivity(appIntent);
            }
        });
    }


}
